package com.yuke.cloud.service.uac.service;

import com.yuke.cloud.common.base.dto.LoginAuthDto;
import com.yuke.cloud.service.uac.dto.RoleBindMenuDto;
import com.yuke.cloud.service.uac.entity.AccRoleMenu;
import com.yuke.cloud.common.core.support.IService;
import com.yuke.cloud.service.uac.vo.BindAuthVo;

import java.util.List;


/**
 * Created by wg on 2018/10/31.
 */
public interface AccRoleMenuService extends IService<AccRoleMenu> {

    /**
     * Delete by role id.
     *
     * @param roleId the role id
     */
    void deleteByRoleId(Long roleId);

    /**
     * Delete by role id list.
     *
     * @param roleIdList the role id list
     */
    void deleteByRoleIdList(List<Long> roleIdList);

    /**
     * Gets menu tree by role id.
     *
     * @param roleId the role id
     *
     * @return the menu tree by role id
     */
    BindAuthVo getMenuTreeByRoleId(Long roleId);

    /**
     * Gets checked menu list.
     *
     * @param roleId the role id
     *
     * @return the checked menu list
     */
    List<Long> getCheckedMenuList(Long roleId);

    /**
     * Bind menu.
     *
     * @param roleBindMenuDto the role bind menu dto
     */
    void bindMenu(RoleBindMenuDto roleBindMenuDto, LoginAuthDto loginAuthDto);

    /**
     * List by role id list.
     *
     * @param roleId the role id
     *
     * @return the list
     */
    List<AccRoleMenu> listByRoleId(Long roleId);

    List<String> getOwnMenuUrlList(Long userId);
}
